using Microsoft.Phone.Controls.Properties;
using System;
using System.Globalization;
using System.Windows.Data;
namespace Microsoft.Phone.Controls
{
	public class OffOnConverter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			if (targetType == null)
			{
				throw new ArgumentNullException("targetType");
			}
			if (targetType != typeof(object))
			{
				throw new ArgumentException(Resources.UnexpectedType, "targetType");
			}
			if (!(value is bool?) && value != null)
			{
				throw new ArgumentException(Resources.UnexpectedType, "value");
			}
			bool? flag = (bool?)value;
			if (!flag.GetValueOrDefault() || !flag.get_HasValue())
			{
				return Resources.Off;
			}
			return Resources.On;
		}
		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			throw new NotImplementedException();
		}
	}
}
